package com.briup.pts.web.controller;

import com.briup.pts.config.response.Result;
import com.briup.pts.domain.vo.SourceVO;
import com.briup.pts.service.SourceService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RequestMapping("/source")
@RestController
@RequiredArgsConstructor
public class SourceController {

    private final SourceService service;

    @GetMapping("/{animalId}")
    public Result<SourceVO> source(@PathVariable String animalId){
        SourceVO sourceVO = service.source(animalId);
        return Result.success(sourceVO);
    }
}
